DBMEDIT
Section: Maintenance Commands (8)
Updated: 24 April 1986
Index
Return to Main Contents
NAME
dbmedit - edit the mmdf database file
SYNOPSIS
dbmedit
[
-v
] [
-d
database
] [
cmd
...
]
DESCRIPTION
Dbmedit
is a program to manually edit the dbm(3) database used by MMDF.
It is intended to be used by the system maintainer for quick
and simple changes to the database.
It can also be used by careful setuid programs to make controlled
changes on behalf of users.
For example, a forwardmail command might use
dbmedit to change a user's entry in the
dbm database after changing the mail forwarding alias file.
The -v option may be used to get a verbose description of the
program's activities.
The -d option may be used to specify an alternate database. The
default is given by the ``tbldbm'' configuration variable or by the
MDBM mmdftailor variable.
If no arguments are given to dbmedit then the program
goes into an interactive mode, and prompts the user for each
command. Otherwise the arguments are taken as one command.
Commands in dbmedit refer to keys, tables, and values.
Tables (see tables(5)) are hashed into the database using dbmbuild(8).
(Tables that refer to domain name servers are not part of the database).
The keys appear on the LHS of the tables and the values on the RHS.
In general, only the first occurence of a value for a given
key/table pair is significant.
For example, the table entries:
table1:
key1: val1
key2: val2
table2:
key1: val3
key1: val4
get hashed into the following database entries:
key1 table1 val1
key1 table2 val3
key1 table2 val4
key2 table1 val2
(In the current implementation, the database is keyed on only
the key, and table/value pairs are encoded in the data portion.
This is likely to change but will not affect this or any other
program.)
The command lines in interactive mode are parsed using the standard
MMDF string-to-argument routines so the same quoting
and escape conventions are used.
For example, if you want double-quotes or spaces
in the value, they must be
escaped with a backslash or the string must be quoted (for spaces).
The commands are:
-
- print key [table]
-
Print the value of the key/table pair.
If the table is omitted, then print the value of any
table entry with this key.
- add key table value
-
Add a key/table entry with the given value.
In verbose mode, a warning message is printed if the given
key/table pair already has a value in the database.
- delete key [table [value]]
-
Delete the values for the specified key. If a table is specified,
delete only the values for the specified key/table pair. If a value
is also specified, delete only entries for the pair with that value.
It is an error to try to delete something which does not appear in
the database as specified.
- change key table [oldvalue] newvalue
-
Change the value of the specified key/table pair to
newvalue.
If
oldvalue
is specified, change the entry matching that value. Otherwise,
change the value of the first occurence or add a new key/table pair
if none already exists.
- help
-
Give a brief summary of the commands
- quit
-
Exit the program.
All commands may be shortened to their first character only.
If the wrong number of arguments is given to a command, a
``Usage:'' message will be printed.
All changes are made in real time.
This program may be used while MMDF processes are running.
There is no temporary copy of the database while editing.
FILES
$(tbldbm).{dir,pag} - the mmdf database
SEE ALSO
tables(5), dbmbuild(8), dbmlist(8)
AUTHOR
Phil Cockcroft, UCL
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- FILES
-
- SEE ALSO
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 06:40:18 GMT, May 19, 2025